package api

import (
	"go_iot/apps/device/entity"

	"github.com/kataras/iris/v12"
)

func InitRouter(iris *iris.Application) {
	v1 := iris.Party("/device")
	{
		v1.Get("/list", getDeviceList)
		v1.Post("/add", addDevice)
	}
}

func getDeviceList(ctx iris.Context) {
	d := entity.Device{
		Name: "test",
	}

	ctx.JSON(d)
}

func addDevice(ctx iris.Context) {

}
